package top.jlzhou.tools.sms;

/**
 * <pre>短信异常</pre>
 * @ClassName	top.jlzhou.tools.sms.SmsException
 * @author	J.L.Zhou
 * @date	2019年3月9日 下午6:53:06
 * @version 	V1.0
 * @Copyright	2019 jlzhou.top Inc. All rights reserved. 
 * 	注意：本内容仅限于公司内部传阅，禁止外泄以及用于其他的商业目
 */
@SuppressWarnings("serial")
public class SmsException extends Exception {

	private int code;
	private String message;
	
	public SmsException(int code) {
		super();
		this.code = code;
	}
	
	public SmsException(int code, Throwable cause) {
		super(cause);
		this.code = code;
	}
	
	public SmsException(int code,String message) {
		super();
		this.code = code;
		this.message = message;
	}
	
	public SmsException(int code,String message, Throwable cause) {
		super(cause);
		this.code = code;
		this.message = message;
	}

	public String getMessage() {
		return message==null?""+code:message;
	}


	public int getCode() {
		return code;
	}

	
	
}
